<template>
  <div class="cardList" style="width: 100%;height: 100%;float: right;position: relative">
    <div style="width: 250px;height: 100%;background-color: #9a6e3a;position: absolute;z-index: 99">
      <el-select v-model="value" placeholder="请选择" @change="changeType">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select>
    </div>
    <three :msg="dataType" ref="three"/>
  </div>
</template>

<script>
  import {Select,Option} from 'element-ui'
  import Three from './Three'
  export default {
    name: "Index.vue",
    components:{
      Three,
      ElSelect:Select,
      ElOption:Option
    },
    data(){
      return{
        dataType:'',
        fileUrl:config.url.file.fileUrl,
        options: [{
          value: '1',
          label: '画线'
        }, {
          value: '2',
          label: '挖洞'
        }, {
          value: '3',
          label: '模型'
        }],
        value: ''
      }
    },
    mounted() {
      this.addThree()
    },
    methods:{
      changeType(type){
        this.dataType=type
      },
      addThree(){
        const that=this
        this.$refs.three.adds(this.fileUrl)
      }
    }

  }
</script>

<style scoped>

</style>
